﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="POC._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Data Wrapper Test Page</title>
    <script type="text/javascript" src="jquery-1.6.1.js"></script>
    <script type="text/javascript" src="jquery.tmpl.min.js" ></script>
    <script id="tmplOptions" type="text/x-jquery-tmpl"> 
        <option value=${Value}>${Text}</option>
    </script>
    <script type="text/javascript" >
        $(document).ready(function () {
            BindCombo1();
        });
        function BindCombo() {
            $.ajax({
                async: true,
                type: 'GET',
                url: "JSON.aspx",
                success: function (str) {                    
                    var data = eval('(' + str + ')');
                    $("#drpHierarchy").empty();
                    $("#tmplOptions").tmpl(data).appendTo("#drpHierarchy");                    
                }
            });
        }
        function BindCombo1() {
            $.ajax({
                async: true,
                type: 'GET',
                url: "JSON.aspx",
                success: function (str) {
                    var data = eval('(' + str + ')');
                    $("#drpNodes").empty();
                    $("#tmplOptions").tmpl(data).appendTo("#drpNodes");
                }
            });
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table>
            <tr>
                <td>
                    Hierarchy
                </td>
                <td>
                    <select id="drpHierarchy">
                    </select>
                </td>
            </tr>
            <tr>
                <td>
                    Version
                </td>
                <td>
                    <input type="text" id="txtVersion" />
                </td>
            </tr>
            <tr>
                <td align="center" colspan="2">
                    <input type="button" value="Save" />
                    <input type="button" value="Update" />
                    <input type="button" value="Delete" />
                </td>
            </tr>
            <tr>
                <td align="center" colspan="2">
                    <input type="button" value="Prev" />
                    <input type="button" value="Next" />
                </td>
            </tr>
            <tr>
                <td>
                    Nodes
                </td>
                <td>
                    <select id="drpNodes">
                    </select>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
